package com.cinc.ebc.mm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cinc.ebc.mm.entity.MmPurchaseRequisitionDetail;
import com.cinc.ebc.mm.model.MmPurchaseRequisitionDetailModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: 采购申请明细
 * @Author: jeecg-boot
 * @Date:   2022-03-20
 * @Version: V1.0
 */
public interface MmPurchaseRequisitionDetailMapper extends BaseMapper<MmPurchaseRequisitionDetail> {

	public boolean deleteByMainId(@Param("mainId") String mainId);
    
	public List<MmPurchaseRequisitionDetail> selectByMainId(IPage<MmPurchaseRequisitionDetail>page, @Param("mainId") String mainId);

	public List<MmPurchaseRequisitionDetailModel> selectAllByMainId(IPage<MmPurchaseRequisitionDetailModel>page, @Param("mainId") String mainId);

	List<String> selectIdByMainId(@Param("mainIds") List<String> mainIds);

	int autoUpdatePurQtyByIdlist(@Param("idList")List<String> idList);

	int autoUpdateStatusByIdlist(@Param("idList")List<String> idList);
}
